local bogus_flower_skill = fk.CreateSkill{
    name = "ym_water__huzhang_bogus_flower_skill",
}
local U = require "packages/utility/utility"
bogus_flower_skill:addEffect("cardskill",{
    mute = true,
    mod_target_filter = Util.TrueFunc,
    can_use = Util.CanUseToSelf,
    on_effect = function(self, room, effect)
        local target = effect.to
        if target.dead or target:isNude() then return end
        local table = type(effect.from:getMark("ym_water__huzhang")) == "table" and effect.from:getMark("ym_water__huzhang") or {1,2}
        local cards = room:askToDiscard(target, {
            min_num = table[1],
            max_num = table[2],
            include_equip = true,
            skill_name = bogus_flower_skill.name,
            prompt = "#ym_water__huzhang_bogus_flower-discard:::"..U.ConvertNumber(table[1])..":"..U.ConvertNumber(table[2]),
            cancelable = false,
            skip = true,
        })
        if #cards == 0 then return end
        local n = #cards
        local x = 0
        for _, id in ipairs(cards) do
            if Fk:getCardById(id).type == Card.TypeEquip then
                n = #cards + 1
            end
            x = x + Fk:translate(Fk:getCardById(id).trueName, "zh_CN"):len()
        end
        if x == effect.from:getMark("@ym_water__huzhang") then
            table[1] = table[1] + 1
            table[2] = table[2] + 1
        elseif effect.from:getMark("@ym_water__huzhang") ~= 0 then
            table = {1,2}
            room:invalidateSkill(effect.from, "ym_water__huzhang", "-turn")
        end
        room:setPlayerMark(effect.from,"@ym_water__huzhang",x)
        room:setPlayerMark(effect.from,"ym_water__huzhang",table)
        room:throwCard(cards, bogus_flower_skill.name, target, target)
        if not target.dead then
            target:drawCards(n, bogus_flower_skill.name)
        end
    end,
})
return bogus_flower_skill